
RM := rm -rf
CP := cp -rp
MKDIR := mkdir
INSTALL_DIR := ~/.lv2/varan.lv2

-include subdir.mk

USER_OBJS :=
LIBS := `pkg-config --cflags --libs gtkmm-2.4`

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif

GUI_CPP_SRCS += \
./metronome_gui.cpp \
./widget.cpp 

PLUGIN_C_SRCS += \
./metronome.c 

PLUGIN_OBJS += \
./metronome.o

GUI_OBJS += \
./metronome_gui.o \
./widget.o 

PLUGIN_C_DEPS += \
./metronome.d 

GUI_CPP_DEPS += \
./metronome_gui.d \
./widget.d 

TEST_CPP_SRCS += \
widget.cpp \
test-window.cpp \
gui-test.cpp

TEST_BIN = gui-test

# All Target
all: metronome.so metronome_gui.so test install

# Tool invocations
metronome.so: $(PLUGIN_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: Cross G++ Linker'
	g++ -L. -shared -o "metronome.so" $(PLUGIN_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '
	
metronome_gui.so: $(GUI_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: Cross G++ Linker'
	g++ -L. -shared -o "metronome_gui.so" $(GUI_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

test:
	g++ $(TEST_CPP_SRCS) -o $(TEST_BIN) $(LIBS)

 
# Other Targets
clean:
	-$(RM) $(C++_DEPS) $(PLUGIN_OBJS) $(GUI_OBJS) $(PLUGIN_C_DEPS)$(CC_DEPS)$(LIBRARIES)$(GUI_CPP_DEPS)$(CXX_DEPS)$(C_UPPER_DEPS) $(OBJS) metronome.so metronome_gui.so test-window $(TEST_BIN)
	-@echo ' '

install:
	@echo 'Installing LV2 plug-in'
	$(RM) $(INSTALL_DIR)
	$(MKDIR) $(INSTALL_DIR)
	$(CP) metronome.so metronome_gui.so manifest.ttl metronome.ttl $(INSTALL_DIR)

.PHONY: all clean dependents
.SECONDARY:
